package com.example.demo.web;

import com.example.demo.service.CacheService;
import com.example.demo.util.GuidUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:lgl
 * @Description:
 * @Date:Create in 2018/1/11 .
 */
@RestController
public class CacheController {

    @Autowired private CacheService cacheService;

    @GetMapping("cache")
    public String index(String userId) {
        cacheService.saveToken(userId, GuidUtils.getUuid());
        return "a";
    }


}
